<template>
<div class="feed_back_wrapper">
  <el-collapse accordion>
    <el-collapse-item v-for="(item, index) in feedback" :key="index">
      <template slot="title">
        <div class="title_wrapper" >
          <i class="header-icon el-icon-info title_icon"></i> &nbsp;&nbsp;&nbsp;&nbsp;{{item.petOwn.nickname}}&nbsp;&nbsp;反馈： 一致性 Consistency 
          <span class="gl_grey_font title_date" >&nbsp;&nbsp;&nbsp;&nbsp;{{item.time}}</span>
        </div>
      </template>
      <div>{{item.content}}</div>
    </el-collapse-item>
  </el-collapse>
</div>
</template>

<script>
import {myGet} from '../utils/api'
export default {
  data(){
    return {
      feedback: []
    }
  }, 
  mounted(){
    myGet('/feedback/all', null).then(res => {
      var myres = res.data.res
      this.feedback = myres
      console.debug(myres)
    }).catch(err => {
    })
  },
}
</script>

<style scoped>
.feed_back_wrapper{
  /* width: 100%; */
  padding: 40px;
}
.title_wrapper{
  display: flex;
  width: 100%;
}
.title_icon{
  margin: auto auto;
}
.title_date{
  flex:1;
  margin-right: 30px;
  text-align: right;
}
</style>